package books;

public class Book {
    private String name ;
    private int money ;
   private String author ;
    private String type ;
    private boolean isBorrow ;

    public Book(String name, int money, String author, String type) {
        this.name = name;
        this.money = money;
        this.author = author;
        this.type = type;

    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getMoney() {
        return money;
    }

    public void setMoney(int money) {
        this.money = money;
    }

    public String getAuthor() {
        return author;
    }

    public void setAuthor(String author) {
        this.author = author;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public boolean getIsBorrow() {
        return isBorrow;
    }

    public void setIsBorrow(boolean borrow) {
        isBorrow = borrow;
    }

    @Override
    public String toString() {
        return "Book{" +
                "书名='" + name + '\'' +
                ", 作者='" + author + '\'' +
                ", 类型='" + type + '\'' +
                ", 价格=" + money +
                ", isBorrow=" + (isBorrow ==false ?"  未借出" :"   已借出") +
                '}';
    }
}
